<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
    <title>地图显示</title>
    <style>
        html,
        body,
        #container {
            width: 100%;
            height: 100%;
        }
    </style>
        <style type="text/css">
            #result {
                margin: 0;
                padding: 0;
                z-index: 999;
                position: absolute;
                background-color: white;
                max-height: 100%;
                overflow-y: auto;
                top: 0;
                right: 0;
                width: 280px;
            }
        </style>
</head>

<body>
    <div id="container"></div>
    <div class="input-card">
        <h4>左击获取经纬度：</h4>
        <div class="input-item">
            <input type="text" readonly="true" id="lnglat">
        </div>
    </div>

    
</body>
<!-- 加载地图JSAPI脚本 -->
<script src="https://webapi.amap.com/maps?v=1.4.15&key=afe68489369b5fb1f022e3a24dd0a664"></script>
<script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
<script>
    // 中心经纬度
        var map = new AMap.Map('container', {
            resizeEnable: true, //是否监控地图容器尺寸变化
            zoom: 18, //初始化地图层级
            center: [108.90649, 34.237789] //初始化地图中心点
        });
        //为地图注册click事件获取鼠标点击出的经纬度坐标
        map.on('click', function (e) {
            document.getElementById("lnglat").value = e.lnglat.getLng() + ',' + e.lnglat.getLat()
        });
    
    // 点坐标+圆覆盖物
        // 构造点标记
            var marker = new AMap.Marker({
                icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
                position: [108.90649, 34.237789]
            });
            // 构造矢量圆形
            var circle = new AMap.Circle({
                center: new AMap.LngLat("108.90649", "34.237789"), // 圆心位置
                radius: 50,  //半径
                strokeColor: "#F33",  //线颜色
                strokeOpacity: 1,  //线透明度
                strokeWeight: 3,  //线粗细度
                fillColor: "#ee2200",  //填充颜色
                fillOpacity: 0.35 //填充透明度
            });
    
            // 将以上覆盖物添加到地图上
            // 单独将点标记添加到地图上
            map.add(marker);
            // add方法可以传入一个覆盖物数组，将点标记和矢量圆同时添加到地图上
            map.add([marker, circle]);

</script>